#include <stdio.h>

int main ()
{
    while (1) {
        int c = getchar() != EOF;
        printf("%d\n", c);
    }
    return 0;
}